<div  >
    <div class=" tool-bar pull-right ">

        <div class="btn-group visible-lg-inline">

            <a href="javascript:void(0)" ng-click="createUser()" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i>添加用户</a>
        </div>

    </div>
    <div>

        <div  >
            <table class="table table-bordered table-hover">
                <thead>
                <tr class="active">
                    <th translate>label.name</th>
                    <th translate>label.status</th>
                    <th translate>label.registerTime</th>

                </tr>
                </thead>
                <tbody>

                <tr  ng-repeat="user in webResult.list"   ng-click="editUser(user)" ng-class="{success:user==selectedUser}">
                    <td>{{user.username}}</td>
                    <td>{{user.enabled}}</td>
                    <td>
                       {{ user.registerTime|date:'yyyy-MM-dd HH:mm'}}
                    </td>

                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<form class="form-horizontal  edit-form" role="form" ng-show="selectedUser" ng-submit="updateUser()">

    <div class="form-group"  >
        <label   class="col-sm-2 control-label" translate>label.username</label>
        <div class="col-sm-10">
            <input  name="name" ng-disabled="selectedUser.registerTime" type="text" ng-model="selectedUser.username"   class="form-control"  >
        </div>
    </div>
    <div class="form-group"  >
        <label   class="col-sm-2 control-label" translate>label.password</label>
        <div class="col-sm-10">
            <input  name="name"   type="password" ng-model="selectedUser.password"   class="form-control"  >
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <div class="checkbox">
                <label>
                    <input type="checkbox" ng-model="selectedUser.enabled" > {{'label.statusEnable' | translate}}
                </label>
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit"  class="btn btn-primary" translate>label.ok</button>
            <a  ng-click="editUser()" class="btn btn-default" translate>label.cancel</a>
            <button type="button" class="btn btn-danger pull-right" confirmed-click="removeUser(selectedUser)"
                    ng-confirm-click="{{'tip.confirmDelete' | translate}}[{{selectedUser.username}}]?">{{'label.delete' | translate}}</button>

        </div>
    </div>

</form>
